{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import matplotlib as mpl\n",
    "import matplotlib.pyplot as plt\n",
    "import numpy as np"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# 解决中文显示问题\n",
    "mpl.rcParams['font.sans-serif'] = [u'SimHei']\n",
    "mpl.rcParams['axes.unicode_minus'] = False"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# 设置在jupyter中matplotlib的显示情况\n",
    "%matplotlib tk"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAjgAAAEYCAYAAABRMYxdAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHclJREFUeJzt3X+QXedd3/H3J1LCOHZ+OEQjRyHCk8akFGzFwyZRjIxX\nbjzEzqQgB7Db1FESQBBSGNrSwRA1BNfQ1KSelhAbFAxV/asYaExCfnTsWprI47ixTGI7Cc6PNrJT\nYxGR2lqctgyEb/+4Z6v16q72rPbevWfPvl8zd+bcZ7/nud9n791HXz3n3HNSVUiSJPXJMyadgCRJ\n0qhZ4EiSpN6xwJEkSb1jgSNJknrHAkeSJPWOBY4kSeodCxytuCRvSPKVJEeSXDan/eeS/NyQ+Lck\n+Q9D2qeT7D+J1393kncvdT9Jq1fbv/uF5ps5Px86T6l71k86Aa0OSZ4PvKWq/t0IursKeDNwN/D8\n2caqeu8I+paksXGeWj1cwVFbzwd+dkR9nQ58tQaeGFGfkiT9fxY4Ok6SX07yZ0keT/JTSW4B7gNe\nkuRwko/PiX1rki8m+WqSH2/a3p3kj5P8aZJHk7yhaf8nSQ4DLwHua/p69py+ln3oKMlZST6R5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B7F+oDXgugw/HtcCfAs9biVwY3On494FPAJ8EXjzBXF4F\nfI5BhXwHg+p4RXIB3s7gkNj+5rFz/utOMJdfmvf8spV8j4bkc9mkPr8LvE8T/fyO8fe+4O+2D2Oc\nM77vBh4EHgJ+ZSU/T2MYU2fmkRUa3y/15b1rcp897PYJ4Lrm/Vr2++eF/ujWlU7NpftXo+1SLl3L\np0u5jELXP4vj0Jfx+d6t7vGN4v2zwJEkSb2z1s7BkSRJa4AFjiRJ6h0LHEmS1DsWOJIkqXcscCRJ\nUu/8P/ZqKXj4a2/kAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x65dee10>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "np.random.seed(0)\n",
    "\n",
    "mu = 200\n",
    "sigma = 25\n",
    "x = np.random.normal(mu, sigma, size=100)\n",
    "\n",
    "fig, (ax0, ax1) = plt.subplots(ncols=2, figsize=(8, 4))\n",
    "\n",
    "ax0.hist(x, 20, normed=1, histtype='stepfilled', facecolor='g', alpha=0.75)\n",
    "ax0.set_title('stepfilled')\n",
    "\n",
    "# Create a histogram by providing the bin edges (unequally spaced).\n",
    "bins = [100, 150, 180, 195, 205, 220, 250, 300]\n",
    "ax1.hist(x, bins, normed=1, histtype='bar', rwidth=0.8)\n",
    "ax1.set_title('unequal bins')\n",
    "\n",
    "fig.tight_layout()\n",
    "plt.savefig(\"unequal bins\")\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "anaconda-cloud": {},
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.13"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
